namespace PritunlApiServer
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var builder = WebApplication.CreateBuilder(args).Inject();

            // Add services to the container.

            var serv = builder.Services;

            serv.AddControllers();
            serv.AddInject();
            serv.AddJwt<JwtHandler>(enableGlobalAuthorize: true);

            var app = builder.Build();

            // Configure the HTTP request pipeline.
            app.UseAuthentication();
            app.UseAuthorization();
            app.UseInject("PritunlApi");

            app.MapControllers();

            app.Run();
        }
    }
}